/*
  Copyright 2009 Smart Enterprise Solution Corp.
  Email: contact@ses.vn - Website: http://www.ses.vn
  KimNgan Project.
*/
using System;
using System.Data;
using System.Configuration;
using System.Collections;

using VINETLIFE.DAL;
using VINETLIFE.DO;
/// <summary>
/// Summary description for cmsProductBL
/// </summary>
namespace VINETLIFE.BL 
{
    public class cmsProductBL 
    {
    	#region Private Variables
		cmsProductDAL objcmsProductDAL;
		#endregion
        #region Public Constructors
        public cmsProductBL()
        {
            //
            // TODO: Add constructor logic here
            //
            objcmsProductDAL=new cmsProductDAL();
        }
        #endregion       
        #region Public Methods
        public int Insert(cmsProductDO objcmsProductDO)
        {
            return objcmsProductDAL.Insert(objcmsProductDO);
        }
        public int Update(cmsProductDO objcmsProductDO)
        {
             return objcmsProductDAL.Update(objcmsProductDO);

        }
        public int UpdateOrInsertByProductCode(cmsProductDO objcmsProductDO)
        {
            return objcmsProductDAL.UpdateOrInsertByProductCode(objcmsProductDO);
        }
        public int Delete(cmsProductDO objcmsProductDO)
        {
             return objcmsProductDAL.Delete(objcmsProductDO);

        }
        public int DeleteAll()
        {
             return objcmsProductDAL.DeleteAll();
        }
        public cmsProductDO Select(cmsProductDO objcmsProductDO)
        {
            return objcmsProductDAL.Select(objcmsProductDO);
        }
        public ArrayList SelectAll1( )
        {
         return objcmsProductDAL.SelectAll1();
        }
        public DataTable SelectAll( )
        {
         return objcmsProductDAL.SelectAll();
        }
        public DataTable SelectByNewAndCategory(int top,int productCategoryID)
        {
            return objcmsProductDAL.SelectByNewAndCategory(top,productCategoryID);
        }
        public DataTable SelectByPromotionAndCategory(int top, int productCategoryID)
        {
            return objcmsProductDAL.SelectByPromotionAndCategory(top, productCategoryID);
        }
        public DataTable SelectByProductCategory(int productCategoryID)
        {
            return objcmsProductDAL.SelectByProductCategory(productCategoryID);
        }

        public DataTable SelectByProductCategoryHomepage(int productCategoryID)
        {
            return objcmsProductDAL.SelectByProductCategoryHomepage(productCategoryID);
        }
        public DataTable SelectByProductCategoryTop(int productCategoryID, int ProductID)
        {
            return objcmsProductDAL.SelectByProductCategoryTop(productCategoryID, ProductID);
        }
        public DataTable SelectByProductCategoryAndKeyword(int productCategoryID, string keyword)
        {
            return objcmsProductDAL.SelectByProductCategoryAndKeyword(productCategoryID, keyword);
        }
        public DataTable SelectByPK(int productID)
        {
            return objcmsProductDAL.SelectByPK(productID);
        }
        #endregion 
        public DataTable SelectFrontPage(int top, int isNew, int isBestBuy, int isPromotion, int isSetTop)
        {
            return objcmsProductDAL.SelectFrontPage(top, isNew, isBestBuy, isPromotion, isSetTop);
        }
        public DataTable SelectFrontPage(int top)
        {
            return objcmsProductDAL.SelectFrontPage(top);
        }
        public DataTable SelectFrontPage(int top, int locationId, int categoryId, int isHomepage, int isNew, int isPromotion, int isBestBuy,int isSetTop)
        {
            return objcmsProductDAL.SelectFrontPage(top, locationId,categoryId,isHomepage,isNew,isPromotion,isBestBuy,isSetTop);
        }
        public DataTable SelectByProductCategoryAll(int productCategoryID)
        {
            return objcmsProductDAL.SelectByProductCategoryAll(productCategoryID);
        }
        public DataTable SimpleSearch(string keyword)
        {
            return objcmsProductDAL.SimpleSearch(keyword);
        }

        public DataTable GetByPrice(object fromPrice, object toPrice)
        {
            return objcmsProductDAL.GetByPrice(fromPrice,toPrice);
        }

        public DataTable GetByOriginID(int OriginId)
        {
            return objcmsProductDAL.GetByOriginID(OriginId);
        }
        public DataTable GetByIsNew(bool IsNew,int top)
        {
            return objcmsProductDAL.GetByIsNew(IsNew,top);
        }
        public DataTable GetByIsBestbuy(int top,bool isBestBuy)
        {
            return objcmsProductDAL.GetByIsBestbuy(top,isBestBuy);
        }
        public DataTable GetByIsPromotion(bool IsPromotion,int top)
        {
            return objcmsProductDAL.GetByIsPromotion(IsPromotion,top);
        }
        public DataTable SearchSenior(int productCateId, int OriginId, object fromPrice, object toPrice, int isPrice)
        {
            return objcmsProductDAL.SearchSenior(productCateId, OriginId, fromPrice, toPrice, isPrice);
        }
    }
}
